package com.ruoyi.common.utils;

import java.util.Date;

import static com.ruoyi.common.utils.DateUtils.YYYY_MM_DD;

/**
 * @author zls
 * @date 2020-11-07 15:29:57
 * @description
 */
public class IdUtil {
    private static final Snowflake snowflak = new Snowflake(0, 0);

    public static final long nextId() {
        return snowflak.nextId();
    }
    public static final String nextIdStr() {
        return snowflak.nextIdStr();
    }

    public static void main(String[] args) {
        System.out.println(DateUtils.dateTime(YYYY_MM_DD,"2010-01-01").getTime());
        System.out.println(DateUtils.dateTime(YYYY_MM_DD,"2020-01-01").getTime());
        System.out.println(new Date(2020,1,1).getTime());
        System.out.println(new Date().getTime());
        System.out.println(System.currentTimeMillis());
    }
}
